package com.platform.common.core.domain.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.core.annotation.Excel;
import com.platform.common.core.web.domain.BaseEntity;

/**
 * 接口调用日志对象 plat_api_log
 *
 * @author platform
 * @date 2023-04-07
 */
public class PlatApiLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 日志主键 */
    private Long logId;

    /** 应用主键 */
    @Excel(name = "应用主键")
    private Long appId;

    /** 接口主键 */
    @Excel(name = "接口主键")
    private Long apiId;

    /** accss_token */
    @Excel(name = "accss_token")
    private String accssToken;

    /** 应用code */
    @Excel(name = "应用code")
    private String appCode;

    /** 平台给该应用颁发的唯一标识 */
    @Excel(name = "平台给该应用颁发的唯一标识")
    private String clientId;

    /** 平台给该应用的密钥 */
    @Excel(name = "平台给该应用的密钥")
    private String clientSecret;

    /** 响应时长 */
    @Excel(name = "响应时长")
    private Long asktime;

    /** 主机地址 */
    @Excel(name = "主机地址")
    private String operIp;

    /** 操作地点 */
    @Excel(name = "操作地点")
    private String operLocation;

    /** 请求参数 */
    @Excel(name = "请求参数")
    private String operParam;

    /** 返回参数 */
    @Excel(name = "返回参数")
    private String jsonResult;

    /** 操作状态（0正常 1异常） */
    @Excel(name = "操作状态", readConverterExp = "0=正常,1=异常")
    private String status;

    /** 错误消息 */
    @Excel(name = "错误消息")
    private String errorMsg;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operTime;

    public void setLogId(Long logId)
    {
        this.logId = logId;
    }

    public Long getLogId()
    {
        return logId;
    }
    public void setAppId(Long appId)
    {
        this.appId = appId;
    }

    public Long getAppId()
    {
        return appId;
    }
    public void setApiId(Long apiId)
    {
        this.apiId = apiId;
    }

    public Long getApiId()
    {
        return apiId;
    }
    public void setAccssToken(String accssToken)
    {
        this.accssToken = accssToken;
    }

    public String getAccssToken()
    {
        return accssToken;
    }
    public void setAppCode(String appCode)
    {
        this.appCode = appCode;
    }

    public String getAppCode()
    {
        return appCode;
    }
    public void setClientId(String clientId)
    {
        this.clientId = clientId;
    }

    public String getClientId()
    {
        return clientId;
    }
    public void setClientSecret(String clientSecret)
    {
        this.clientSecret = clientSecret;
    }

    public String getClientSecret()
    {
        return clientSecret;
    }
    public void setAsktime(Long asktime)
    {
        this.asktime = asktime;
    }

    public Long getAsktime()
    {
        return asktime;
    }
    public void setOperIp(String operIp)
    {
        this.operIp = operIp;
    }

    public String getOperIp()
    {
        return operIp;
    }
    public void setOperLocation(String operLocation)
    {
        this.operLocation = operLocation;
    }

    public String getOperLocation()
    {
        return operLocation;
    }
    public void setOperParam(String operParam)
    {
        this.operParam = operParam;
    }

    public String getOperParam()
    {
        return operParam;
    }
    public void setJsonResult(String jsonResult)
    {
        this.jsonResult = jsonResult;
    }

    public String getJsonResult()
    {
        return jsonResult;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setErrorMsg(String errorMsg)
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg()
    {
        return errorMsg;
    }
    public void setOperTime(Date operTime)
    {
        this.operTime = operTime;
    }

    public Date getOperTime()
    {
        return operTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("appId", getAppId())
            .append("apiId", getApiId())
            .append("accssToken", getAccssToken())
            .append("appCode", getAppCode())
            .append("clientId", getClientId())
            .append("clientSecret", getClientSecret())
            .append("asktime", getAsktime())
            .append("operIp", getOperIp())
            .append("operLocation", getOperLocation())
            .append("operParam", getOperParam())
            .append("jsonResult", getJsonResult())
            .append("status", getStatus())
            .append("errorMsg", getErrorMsg())
            .append("operTime", getOperTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
